import request from "@/utils/request";

// 查询房间分页数据
export const queryRoomPageApi = (params) => request.post("/room/page", params);

// 查询某楼栋下所有房间
export const queryRoomListByBuildingApi = (buildingId) => request.get(`/room/list?buildingId=${buildingId}`);

// 新增房间
export const addRoomApi = (room) => request.post("/room", room);

// 根据ID查询房间
export const queryRoomByIdApi = (id) => request.get(`/room/${id}`);

// 修改房间
export const updateRoomApi = (room) => request.put("/room", room);

// 删除房间
export const deleteRoomApi = (id) => request.delete(`/room/${id}`); 